#include<bits/stdc++.h>
using namespace std;
#define ll long long

void solve(int ax,int ay,int bx,int by,int cx,int cy){
    int midx1=(ax+bx)/2;
    int midy1=(ay+by)/2;
    if ((midx1 == 0 && cx == 0) || (midy1 == 0 && cy == 0)) {
        cout<<"YES"<<endl;
        return;
    }
    int midx2=(cx+bx)/2;
    int midy2=(cy+by)/2;
    if ((midx2 == 0 && ax == 0) || (midy2 == 0 && ay == 0)) {
        cout<<"YES"<<endl;
        return;
    }
    int midx3=(cx+ax)/2;
    int midy3=(cy+ay)/2;
    if ((midx3 == 0 && bx == 0) || (midy3 == 0 && by == 0)) {
        cout<<"YES"<<endl;
        return;
    }
    cout<<"NO"<<endl;
}

int main(){
    int T;
    cin>>T;
    int ax,ay,bx,by,cx,cy;
    while(T--){
        cin>>ax>>ay>>bx>>by>>cx>>cy;
        solve(ax,ay,bx,by,cx,cy);
    }

    return 0;
}